import http from "@/utils/http.js";

// 账号密码登录
export const userLogin = (data) => http.post("/adminapi/login/pwd", data);

// 手机验证码
export const phoneCode = (data) => http.post("/adminapi/phone/code", data);

// 手机号登录
export const phoneLogin = (data) => http.post("/adminapi/login/phone", data);

// 登录信息
export const getUserInfo = () => http.get("/adminapi/info");

// 退出登录
export const logout = () => http.post("/adminapi/logout");

// 分页
export const userPage = (params) =>
  http.get("/adminapi/admin/user/page", params);

// 列表
export const userEnableList = (params) =>
  http.get("/adminapi/admin/user/enable/list", params);

// 详情
export const userDetail = (id) => http.get(`/adminapi/admin/user/detail/${id}`);

// 添加
export const userAdd = (data) => http.post("/adminapi/admin/user/add", data);

// 编辑
export const userEdit = (data) => http.post("/adminapi/admin/user/edit", data);

// 删除
export const userDelete = (id) =>
  http.delete(`/adminapi/admin/user/delete/${id}`);

// 更新用户netty
export const updateUserNetty = (data) => http.post('/adminapi/admin/user/update/tcp', data, false)
